package com.t235.gc.order.service;

import com.t235.gc.dao.GarbageRecyclingOrderDao;
import com.t235.gc.entity.GarbageRecyclingOrder;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

/**
 * 垃圾回收订单表(GarbageRecyclingOrder)表服务实现类
 *
 * @author makejava
 * @since 2021-03-24 08:45:29
 */
@Service
public class GarbageRecyclingOrderService {

    @Resource
    private GarbageRecyclingOrderDao garbageRecyclingOrderDao;


    public int deleteByPrimaryKey(Long orderid) {
        return garbageRecyclingOrderDao.deleteByPrimaryKey(orderid);
    }


    public int insert(GarbageRecyclingOrder record) {
        return garbageRecyclingOrderDao.insert(record);
    }


    public int insertSelective(GarbageRecyclingOrder record) {
        return garbageRecyclingOrderDao.insertSelective(record);
    }


    public GarbageRecyclingOrder selectByPrimaryKey(Long orderid) {
        return garbageRecyclingOrderDao.selectByPrimaryKey(orderid);
    }


    public int updateByPrimaryKeySelective(GarbageRecyclingOrder record) {
        return garbageRecyclingOrderDao.updateByPrimaryKeySelective(record);
    }


    public int updateByPrimaryKey(GarbageRecyclingOrder record) {
        return garbageRecyclingOrderDao.updateByPrimaryKey(record);
    }


    public List<GarbageRecyclingOrder> select(GarbageRecyclingOrder garbageRecyclingOrder, String nickname, String userphone, Date begindate, Date finishdate, Integer recyclingtype) {
        return garbageRecyclingOrderDao.select(garbageRecyclingOrder,nickname,userphone,begindate,finishdate,recyclingtype);
    }


    public List<GarbageRecyclingOrder> selectAll() {
        return garbageRecyclingOrderDao.selectAll();
    }


    public void insertGarbageRecyclingOrder(GarbageRecyclingOrder garbageRecyclingOrder) {
        garbageRecyclingOrderDao.insertGarbageRecyclingOrder(garbageRecyclingOrder);
    }


    public void updateGarbageRecyclingOrder(Long orderid, Integer recyclingweight, Integer accpoints) {
        garbageRecyclingOrderDao.updateGarbageRecyclingOrder(orderid,recyclingweight,accpoints);
    }

    public GarbageRecyclingOrder selectAccPointsByUserId(Long userid) {
        return garbageRecyclingOrderDao.selectAccPointsByUserId(userid);
    }
}
